.class public Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;
.super Ljava/lang/Object;
.source "ViewHistory.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewHistory$TicketCell;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "RecipientCell"
.end annotation


# instance fields
.field private m_fBolded:Z

.field private m_nBackground:I

.field private m_nImage:I

.field private m_oImageType:Landroid/widget/ImageView;

.field private m_oRecipient:Lcom/glympse/platform/common/Recipient;

.field private m_oTableRow:Landroid/widget/TableRow;

.field private m_oTextRecipient:Landroid/widget/TextView;

.field private m_oTextViews:Landroid/widget/TextView;

.field final synthetic this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;


# direct methods
.method private constructor <init>(Lcom/glympse/android/glympse/ViewHistory$TicketCell;Lcom/glympse/platform/common/Recipient;)V
    .locals 2
    .parameter
    .parameter "oRecipient"

    .prologue
    const/4 v1, -0x1

    const/4 v0, 0x0

    .line 671
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    .line 668
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 657
    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    .line 658
    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    .line 659
    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oImageType:Landroid/widget/ImageView;

    .line 660
    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextRecipient:Landroid/widget/TextView;

    .line 661
    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextViews:Landroid/widget/TextView;

    .line 663
    iput v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nImage:I

    .line 664
    iput v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nBackground:I

    .line 665
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_fBolded:Z

    .line 670
    iput-object p2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    return-void
.end method

.method synthetic constructor <init>(Lcom/glympse/android/glympse/ViewHistory$TicketCell;Lcom/glympse/platform/common/Recipient;Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 668
    invoke-direct {p0, p1, p2}, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;-><init>(Lcom/glympse/android/glympse/ViewHistory$TicketCell;Lcom/glympse/platform/common/Recipient;)V

    return-void
.end method

.method private CreateCell(Landroid/view/LayoutInflater;J)Landroid/view/View;
    .locals 3
    .parameter "oLayoutInflater"
    .parameter "lCurrentTime"

    .prologue
    .line 676
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    if-nez v0, :cond_0

    .line 678
    const v0, 0x7f030014

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-virtual {p1, v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TableRow;

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    .line 680
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    const v1, 0x7f0c0052

    invoke-virtual {v0, v1}, Landroid/widget/TableRow;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oImageType:Landroid/widget/ImageView;

    .line 681
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    const v1, 0x7f0c0053

    invoke-virtual {v0, v1}, Landroid/widget/TableRow;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextRecipient:Landroid/widget/TextView;

    .line 682
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    const v1, 0x7f0c0062

    invoke-virtual {v0, v1}, Landroid/widget/TableRow;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextViews:Landroid/widget/TextView;

    .line 685
    invoke-direct {p0, p2, p3}, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->Update(J)Z

    .line 688
    :cond_0
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    return-object v0
.end method

.method private Update(J)Z
    .locals 13
    .parameter "lCurrentTime"

    .prologue
    .line 694
    const/4 v0, 0x0

    .line 696
    .local v0, fLayoutChanged:Z
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    if-eqz v8, :cond_7

    .line 699
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-static {v8}, Lcom/glympse/android/glympse/Glympse;->GetRecipientImage(Lcom/glympse/platform/common/Recipient;)I

    move-result v5

    .line 700
    .local v5, nImage:I
    iget v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nImage:I

    if-eq v8, v5, :cond_0

    .line 702
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oImageType:Landroid/widget/ImageView;

    iput v5, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nImage:I

    invoke-virtual {v8, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 703
    const/4 v0, 0x1

    .line 707
    :cond_0
    const/4 v4, 0x0

    .line 708
    .local v4, nBackground:I
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    cmp-long v8, v8, p1

    if-gez v8, :cond_1

    .line 709
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    sub-long v8, p1, v8

    const-wide/32 v10, 0x493e0

    cmp-long v8, v8, v10

    if-gez v8, :cond_2

    .line 711
    :cond_1
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    cmp-long v8, p1, v8

    if-lez v8, :cond_8

    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    sub-long v8, p1, v8

    move-wide v1, v8

    .line 712
    .local v1, lElasped:J
    :goto_0
    const/16 v8, 0xff

    const-wide/16 v9, 0x100

    mul-long/2addr v9, v1

    const-wide/32 v11, 0x493e0

    div-long/2addr v9, v11

    long-to-int v9, v9

    sub-int v3, v8, v9

    .line 713
    .local v3, nAlpha:I
    const/16 v8, 0x99

    const/16 v9, 0xff

    const/16 v10, 0x99

    invoke-static {v3, v8, v9, v10}, Landroid/graphics/Color;->argb(IIII)I

    move-result v4

    .line 717
    .end local v1           #lElasped:J
    .end local v3           #nAlpha:I
    :cond_2
    iget v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nBackground:I

    if-eq v8, v4, :cond_3

    .line 719
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTableRow:Landroid/widget/TableRow;

    iput v4, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_nBackground:I

    invoke-virtual {v8, v4}, Landroid/widget/TableRow;->setBackgroundColor(I)V

    .line 723
    :cond_3
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v8

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory;->access$17(Lcom/glympse/android/glympse/ViewHistory;)Z

    move-result v8

    if-eqz v8, :cond_9

    .line 724
    const/4 v8, 0x2

    iget-object v9, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget v9, v9, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    if-eq v8, v9, :cond_4

    .line 725
    const/4 v8, 0x3

    iget-object v9, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget v9, v9, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    if-ne v8, v9, :cond_9

    .line 726
    :cond_4
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v8, v8, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    move-object v6, v8

    .line 729
    .local v6, strRecipient:Ljava/lang/String;
    :goto_1
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextRecipient:Landroid/widget/TextView;

    invoke-static {v8, v6}, Lcom/glympse/android/glympse/Glympse;->SetTextIfChanged(Landroid/widget/TextView;Ljava/lang/String;)Z

    move-result v8

    or-int/2addr v0, v8

    .line 732
    iget-boolean v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_fBolded:Z

    if-nez v8, :cond_5

    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget v8, v8, Lcom/glympse/platform/common/Recipient;->m_nUse:I

    if-lez v8, :cond_5

    .line 734
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextRecipient:Landroid/widget/TextView;

    const/4 v9, 0x1

    invoke-static {v9}, Landroid/graphics/Typeface;->defaultFromStyle(I)Landroid/graphics/Typeface;

    move-result-object v9

    invoke-virtual {v8, v9}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 735
    const/4 v8, 0x1

    iput-boolean v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_fBolded:Z

    .line 736
    const/4 v0, 0x1

    .line 740
    :cond_5
    const-string v7, "?"

    .line 741
    .local v7, strViews:Ljava/lang/String;
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lCreatedTime:J

    const-wide/16 v10, 0x0

    cmp-long v8, v8, v10

    if-lez v8, :cond_6

    .line 744
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v8

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory;->access$17(Lcom/glympse/android/glympse/ViewHistory;)Z

    move-result v8

    if-eqz v8, :cond_a

    .line 746
    const-string v8, "%d"

    const/4 v9, 0x1

    new-array v9, v9, [Ljava/lang/Object;

    const/4 v10, 0x0

    iget-object v11, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget v11, v11, Lcom/glympse/platform/common/Recipient;->m_nUse:I

    invoke-static {v11}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v11

    aput-object v11, v9, v10

    invoke-static {v8, v9}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    .line 769
    :cond_6
    :goto_2
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oTextViews:Landroid/widget/TextView;

    invoke-static {v8, v7}, Lcom/glympse/android/glympse/Glympse;->SetTextIfChanged(Landroid/widget/TextView;Ljava/lang/String;)Z

    move-result v8

    or-int/2addr v0, v8

    .line 772
    .end local v4           #nBackground:I
    .end local v5           #nImage:I
    .end local v6           #strRecipient:Ljava/lang/String;
    .end local v7           #strViews:Ljava/lang/String;
    :cond_7
    return v0

    .line 711
    .restart local v4       #nBackground:I
    .restart local v5       #nImage:I
    :cond_8
    const-wide/16 v8, 0x0

    move-wide v1, v8

    goto/16 :goto_0

    .line 726
    :cond_9
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-virtual {v8}, Lcom/glympse/platform/common/Recipient;->GetDisplayText()Ljava/lang/String;

    move-result-object v8

    move-object v6, v8

    goto :goto_1

    .line 750
    .restart local v6       #strRecipient:Ljava/lang/String;
    .restart local v7       #strViews:Ljava/lang/String;
    :cond_a
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    const-wide/16 v10, 0x0

    cmp-long v8, v8, v10

    if-gtz v8, :cond_b

    .line 752
    const-string v7, "never"

    goto :goto_2

    .line 756
    :cond_b
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$1(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Z

    move-result v8

    if-eqz v8, :cond_c

    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    cmp-long v8, p1, v8

    if-ltz v8, :cond_c

    .line 758
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v8, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    sub-long v8, p1, v8

    invoke-static {v8, v9}, Lcom/glympse/platform/common/Helpers;->ElapsedToShortStr(J)Ljava/lang/String;

    move-result-object v7

    goto :goto_2

    .line 764
    :cond_c
    iget-object v8, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v8}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v8

    invoke-virtual {v8}, Lcom/glympse/android/glympse/ViewHistory;->getContext()Landroid/content/Context;

    move-result-object v8

    invoke-static {v8}, Landroid/text/format/DateFormat;->getTimeFormat(Landroid/content/Context;)Ljava/text/DateFormat;

    move-result-object v8

    new-instance v9, Ljava/util/Date;

    iget-object v10, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-wide v10, v10, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    invoke-direct {v9, v10, v11}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v8, v9}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v7

    goto :goto_2
.end method

.method static synthetic access$1(Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;Landroid/view/LayoutInflater;J)Landroid/view/View;
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 674
    invoke-direct {p0, p1, p2, p3}, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->CreateCell(Landroid/view/LayoutInflater;J)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2(Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;J)Z
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 692
    invoke-direct {p0, p1, p2}, Lcom/glympse/android/glympse/ViewHistory$TicketCell$RecipientCell;->Update(J)Z

    move-result v0

    return v0
.end method
